import csv
import random
f = open("week2.csv", 'rt')
a = 123444

try:
    reader = csv.reader(f,delimiter=';')
    for row in reader:
        voornaam = row[0]
        achternaam = row[1]
        print (voornaam, achternaam)
finally:
    f.close()






def randomNummer():
    password = ''.join(random.choice('0123456789') for x in range(4))
    return password

fw = open("create.csv", 'w', newline='')
try:
    writer = csv.writer(fw)
    writer.writerow((["Kopdata1"], ["Kopdata2"]))
    for i in range (100):
        writer.writerow(([i], [randomNummer()]))
finally:
    fw.close()